<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <title>地图展示</title>
    <link rel="stylesheet" href="http://cache.amap.com/lbs/static/main1119.css"/>
    <script src="http://cache.amap.com/lbs/static/es5.min.js"></script>
    <script src="http://webapi.amap.com/maps?v=1.3&key={:C('AMAP_KEY')}"></script>
    <script type="text/javascript" src="http://cache.amap.com/lbs/static/addToolbar.js"></script>
</head>
<body>
<div id="container"></div>
<script>


    var longitude = "{$message.longitude}";
    var latitude = "{$message.latitude}";
    longitude = parseFloat(longitude);
    latitude = parseFloat(latitude);
    var map = new AMap.Map('container', {
        resizeEnable: true,
        zoom:11,
        center: [longitude, latitude]

    });
    var icon = new AMap.Icon({
        image:'__STATIC__/images/position.png',
        imageSize:new AMap.Size(21,24),
        size:new AMap.Size(21,24)
    });
    var m = new AMap.Marker({
        icon:icon,
        position:[longitude, latitude],
        map:map
    });
</script>
</body>
</html>